package com.sfzy.service.Impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sfzy.entity.PsyAss;
import com.sfzy.mapper.PsyAssMapper;
import com.sfzy.service.PsyAssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName psyAssServiceImpl
 * @Description TODO
 * @Author niejiacan
 * @Date 2025年08月13日 19:27
 * @Version 1.0
 */
@Service
public class PsyAssServiceImpl implements PsyAssService {
    @Autowired
    private PsyAssMapper psyAssMapper;


    @Override
    public int addPsyAss(PsyAss psyAss) {
        return psyAssMapper.addPsyAss(psyAss);
    }

    @Override
    public int updatePsyAss(PsyAss psyAss) {
        return psyAssMapper.updatePsyAss(psyAss);
    }

    @Override
    public int deletePsyAss(int id) {
        return psyAssMapper.deletePsyAss(id);
    }

    @Override
    public PsyAss seletePsyAss(int id) {
        return psyAssMapper.seletePsyAss(id);
    }

    @Override
    public PageInfo<PsyAss> pageName(PsyAss psyAss, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<PsyAss> psyAsses = psyAssMapper.pageName(psyAss);
        PageInfo<PsyAss> info = new PageInfo<>(psyAsses);
        return info;
    }
}
